package com.mes.schedule.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import com.mes.basicdata.domain.Resource;
/**
 * 工作中心
 * date: Jun 22, 2015 5:09:10 PM <br/>  
 * @author Administrator  
 * @version   
 * @since JDK 1.6
 */
public class SWorkCenter extends Resource  implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	protected String workCenterUid;
	protected String workCenterName;
	/**
	 * 部门唯一号
	 */
	protected String deptUid;
	protected String deptName;
	protected String deviceClass;
	protected String deviceClassName;
	/**
	 * 工作中心的设备列表
	 */
	protected List<SDevice> sDeviceList;

	public String getDeptUid() {
		return deptUid;
	}
	public String getDeptName() {
		return deptName;
	}
	public void setDeptUid(String deptUid) {
		this.deptUid = deptUid;
	}
	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}
	public String getWorkCenterUid() {
		return workCenterUid;
	}
	public String getWorkCenterName() {
		return workCenterName;
	}
	public void setWorkCenterUid(String workCenterUid) {
		this.workCenterUid = workCenterUid;
	}
	public void setWorkCenterName(String workCenterName) {
		this.workCenterName = workCenterName;
	}
	public List<SDevice> getSDeviceList() {
		return sDeviceList;
	}
	public void setSDeviceList(List<SDevice> deviceList) {
		sDeviceList = deviceList;
	}
	public SWorkCenter() {
		super();
		sDeviceList=new ArrayList<SDevice>();
	}
	public String getDeviceClass() {
		return deviceClass;
	}
	public void setDeviceClass(String deviceClass) {
		this.deviceClass = deviceClass;
	}
	public String getDeviceClassName() {
		return deviceClassName;
	}
	public void setDeviceClassName(String deviceClassName) {
		this.deviceClassName = deviceClassName;
	}
	
	public void destroy() {
		// TODO Auto-generated method stub
		try {

			sDeviceList.clear();
			sDeviceList=null;
		} catch (RuntimeException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public void setBottleneckIndex(Integer bottleneckIndex) {
		// TODO Auto-generated method stub
		if(this.sDeviceList!=null&&!this.sDeviceList.isEmpty())
		{
			for(SDevice device:this.sDeviceList)
			{
				device.setBottleneckIndex(bottleneckIndex);
			}
		}
	}

	
	

}
